﻿// <copyright file="IEnOceanService.cs" company="Hallvard Korsgaard">
//  Microsoft Public License (Ms-PL). See license details here: http://enoceannet.codeplex.com/license
// </copyright>
// <author>Hallvard Korsgaard</author>

namespace ServiceContract
{
  using System.Collections.Generic;
  using System.ServiceModel;

  /// <summary>
  /// The service contract to use with WCF.
  /// </summary>
  [ServiceContract(Namespace = "http://enoceannet.codeplex.com/EnOceanTransmitter/v1")]
  public interface IEnOceanTransmitter
  {
    /// <summary>
    /// Returns the transmitters base IDs that this service supports.
    /// </summary>
    /// <returns>The transmitters base IDs that this service supports.</returns>
    [OperationContract(Action = "BaseIds")]
    IEnumerable<long> GetBaseIds();

    /// <summary>
    /// Sends an EnOcean telegram.
    /// </summary>
    /// <param name="telegram">A 14 byte EnOcean telegam.</param>
    [OperationContract(Action = "SendTelegram")]
    void SendTelegram(byte[] telegram);
  }
}
